<template>
    <!-- 财务账套展示栏 -->
    <div>
        <div shadow="hover" class="zhangtao">
            <el-row>
                <el-col :sm="20" :md="6">
                    <span class="acc_title">当前账套:</span>
                    <span style="color: red;font-size:18px"> {{$store.state.accountSet.description}}</span>
                </el-col>
                <el-col :sm="20" :md="6">
                    <span class="acc_title">客户信息:</span>
                    <span style="color: red;font-size:18px"> {{$store.state.accountSet.companyName}}</span>
                </el-col>
                <el-col :sm="20" :md="6">
                    <span class="acc_title">欢迎您:</span>
                    <span style="color: red;font-size:18px"> {{$store.state.userData.username}}</span>
                </el-col>
            </el-row>
        </div>

        <vxe-modal v-model="accDialog" height="200" show-footer>
            <template v-slot:title>
                <span style="color: red;">提示</span>
            </template>
            <div>
                <h1>请先进入账套!</h1>
            </div>
        </vxe-modal>
    </div>
</template>


<script>
export default {
    data() {
        return {
            accDialog: false
        };
    },
    mounted() {},
    created() {
        console.log('created', this.$route.path);
        if (this.$route.path == '/accSetList' || this.$route.path == '/accSet') {
            if (this.$store.state.accountSet.companyName == '') {
                this.accDialog = true;
            }
            return;
        } else {
            if (this.$store.state.accountSet.companyName == '') {
                this.$router.push({
                    path: '/accSetList' //跳转的路径
                });
            }
        }
    },
    methods: {}
};
</script>

<style  scoped>
.acc_title {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    /* font-family: 'FangSong'; */
}
.zhangtao{
    padding: 10px 0 20px;
}
.zhangtao .el-col{
    padding: 0px 10px;
    border-radius: 0px;
    border-left: 5px solid #409EFF;
}
</style>